 
<template>
  <mix-form v-model="form" :fields="fields" />
</template>
<script>
import mixForm from "@/components/mixForm.vue";
export default {
  components: { mixForm },
  name: "user",
  data() {
    return {
      form: {},
      fields: [
        { span: 4, label: "上级菜单", prop: "pid" },
        { span: 4, label: "菜单名称", prop: "title", type: "text", wrap: true },
        { span: 4, label: "关联菜单", prop: "name", type: "select", options: this.getoption, config: { label: "id", value: "key" } }
      ]
    };
  },
  methods: {
    async getoption() {
      console.log(0);
      return [
        {
          id: 1,
          key: 2
        }
      ];
    }
  }
};
</script>
<style lang='scss' scoped>
</style>